(a) Field of the Invention
The present invention relates to a baud rate generator and, more particularly, to an asynchronous baud rate generation circuit in an asynchronous communication used for communication between microcomputers.
(b) Description of the Related Art
A Universal Asynchronous Receiver/Transmitter (hereafter UART) method is widely used as a serial transmission for communicating between microcomputers. It is important in the UART to assure the transmission of a large data volume in a high transfer rate.
The UART method for communicating between two DTE (Data Terminal Equipment) is used for any one of modes including a one-way communication without a return path, a half-duplex communication which has two-way communication but not in both directions simultaneously, and a full-duplex communication which enables a full two-way communication in duplication. In the UART method, data is sent by each frame for transmission/reception at a predetermined transfer rate as a baud rate, or a number of bits per second.
One of a conventional microcomputers is a single chip microcomputer known as .mu.PD78054 manufactured by NEC (see User's Manual .mu.PD78054, .mu.PD78054Y Sub-series 8-bit single chip microcomputer, Material No.IEU-824B, Rev. 4, Page 424, 1996 NEC Document 1). FIG. l is a flowchart showing a conventional baud rate generation circuit which is applicable for both a half-duplex and a full-duplex communications. The conventional baud rate generation circuit performs transmission and reception in an asynchronous mode, and comprises a first programmable counter 11 for counting a clock CK to generate a transmission count CT, a second programmable counter 13 for counting the clock CK to generate a reception count CR, a decoder 12 for setting a specified reference value Q in response to a setting signal BQ sent from a control register not shown, match detection circuits 14 and 15 for generating baud rate signals BT and BR, respectively, when a baud rate after a match of the counts CT or CR with the reference value Q is detected.
FIG. 2 is a timing chart showing UART data format for data transmission/reception and timing clocks of baud rates showing when the baud rates are matched or mismatched between a transmitting station and a receiving station. Referring to FIGS. 1 and 2, before performing the half-duplex transmission, the reference value Q is set in the decoder 12 responding to the setting signal BQ. The first programmable counter 11 in the transmitting station is activated responding to a transmission enable signal ET for counting the clock CK to generate a transmission count CT. The first match detection circuit 14 in the transmitting station supplies a requested transmission baud rate signal BT after the reference value Q and the transmission count are found to be matched therebetween. Similarly, the second programmable counter 13 in the receiving station is activated responding to an receiving enable signal ER for counting the clock CK to generate a reception count CR. The second match detection circuit 15 in the receiving station generates a requested reception baud rate signal BR after the specified value Q and the reception count CR are found to be matched therebetween.
In FIG. 2, one frame data in the UART format includes a start bit ST, character bits D0-D6/D7 including 7 or 8 bits, a parity bit P, and a stop bit SP which may include 2 bits. The parity bit P represents odd/even parity or 0 parity/non-parity. Each bit is transmitted and received in a specified baud rate.
When the programmable counters 11 in the transmitting station and 13 in the receiving station normally operate to correctly generate the baud rates as shown in case #1 in FIG. 2, the parity bit P and the stop bit SP are correctly detected in both transmitted or received frame, and the transmission is finished normally. On the other hand, if a baud rate is not correctly generated due to a counting error by the programmable counter 1 or 3 which causes mismatch of transmission or reception baud rate as shown in case #2 in FIG. 2, the stop bit SP cannot be detected until the completion of one data frame transmission. The receiving station determines that the stop bit SP is not detected and feeds a communication error signal by using another port for retry.
The conventional communication system has a disadvantage in that when a baud rate mismatch occurs between the transmission baud rate and the reception baud rate due to a communication error, it can be detected only after the completion of one frame data transmission between the transmitting station and the receiving station.
There is another disadvantage that the baud rate cannot be identified as a single rate because a counting error caused by noise or other interference in the baud rate cannot be detected and the baud rate obtained is output as it is.